package com.livesource.client.utilities;

import com.google.gwt.user.client.Cookies;
import com.livesource.client.web.repositoryLogin.RepositoryLoginPopup;

public class GetCookies {

	public static String getUsername(String projectID) {

		String username = Cookies.getCookie("repositoryUsername" + projectID);

		if (username == null) {

			new RepositoryLoginPopup(projectID);
		}
		return username;
	}

	public static String getPassword(String projectID) {

		String password = Cookies.getCookie("repositoryPassword" + projectID);

		return password;
	}
	
	public static String getGithubUserLogin() {

		String username = Cookies.getCookie("githubUserLogin");

		return username;
	}
	
	public static String getGithubAuthenticationToken() {

		String githubAuthenticationToken = Cookies.getCookie("githubAuthenticationToken");

		return githubAuthenticationToken;
	}

}
